<!DOCTYPE html>
<html>
<head>
	<title>标签列表</title>
	<meta charset="utf-8">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1,maximum-scale=1">
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<link rel="stylesheet" type="text/css" href="css/label.css">
	<link rel="stylesheet" href="./layui/css/layui.css" media="all">
	<script src="./js/jquery-1.12.4.min.js"></script>
</head>
<body>
<?php include_once('config/header.php'); ?>

<div class="banner">
	标签：<span id="label_name">智能合约</span>
</div>

<div class="content">
	<div class="con-left">
		<div class="news-list" id="news_list">
		</div>
	</div>
	<div class="con-right">
		<?php include_once('config/label-b.php'); ?>
	</div>
</div>
<?php include_once('config/footer.php'); ?>
</body>
<script type="text/javascript" src="./js/function.js"></script>
<script type="text/javascript">
$(function(){
	var new_url = 'http://'+document.domain+"/index/data/searchLabel";
	var id = GetQueryString('id');
	$.ajax({
		type: 'POST',
        url: new_url,
        data:{id:id},
        dataType: 'json',
        success: function(result){
        	var html = '';
			result.forEach((item,i)=>{
				html += '<div class="list">';
					html += '<a href="article.php?id='+result[i]['id']+'"><img src="'+result[i]['img']+'" class="img"></a>';
					html += '<div class="con">';
						html += '<a href="article.php?id='+result[i]['id']+'"><div class="title">'+result[i]['title']+'</div></a>';
						html += '<p>'+result[i]['abstract']+'</p>';
						html += '<div class="author">';
							html += '<div class="left">';
								html += '<img src="./images/201811200020216214-380x228.png" class="head_pic">';
								html += '<a href="author.php?id='+result[i]['user_id']+'" class="member_name">'+result[i]['member_name']+'</a>';
								html += '<img src="./images/dian.png" class="dian">';
								html += '<span>'+timestampToTime(result[i]['addtime'])+'</span>';
								html += '<img src="./images/dian.png" class="dian">';
								result[i]['label_v'].forEach((item,j)=>{
									html += '<a class="label" href="label.php?id='+result[i]['id']+'">'+result[i]['label_v'][j]['name']+'</a>';
								});
							html += '</div>';
						html += '</div>';
					html += '</div>';
				html += '</div>';
			})
			$('#news_list').html(html);
        },
	})
})
</script>
</html>